Disambiguation Methods
Overview
To incorporate a disambiguation method there are two core steps:
- Leverage an LLM to identify all the "topics" within a particular data corpus and its relevant entities.
- Build watsonx assistant actions for each identified "topic" in the data corpus and create a step to provide all the relevant entities as options to the user when a topic is mentioned by the end user.
- Combine the user's selected option with their document search request and present the clarified answer to them.
How to Implement
-
Leverage a python script and the watsonx sdk to determine all the topics within a data corpus and the relevant entities.
Example Topics/Entities:
Topic Entities Browser Chrome, Safari, Firefox Devices iPhone, Android Printer model A, model B -
Build watsonx Assistant actions for each topic and build a step to surface the entities as options to the user
-
Build another step within the watsonx Assistant action to store the selected option as a variable, for example as "selected_option"
-
Combine the user's "selected option" with the document search request
For example, if the variable "user_query" holds the user's original question, such as "How do I clear my browser cache?", you'll need to append the selected option to the "user_query" variable before sending the clarified query to the "Document Search" method.
Example)
user_query.append(" on").append(selected_option)
This will result in the the final query to the "Document Search" method to look like: "How do I clear my browser cache on Safari" which will then return the most appropriate answer.